package com.mvvm.demo.db

import androidx.room.*
import com.mvvm.demo.entity.UserInfo

/**
 *   @auther : lishuaihua
 *   time   : 2020/03/12
 */
@Dao
interface UserInfoDao {

    @Query("SELECT * FROM USER_INFO")
    suspend fun queryUserInfo(): UserInfo?

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insertUserInfo(userInfo: UserInfo)

    @Query("DELETE FROM USER_INFO")
    suspend fun deleteUserInfoAll()




}